home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / portable / killchar.c < prev    next >
C/C++ Source or Header  |  1993-06-18  |  1KB  |  62 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifdef UNIX
  5. #define NOTLIB
  6. #include <defs.h>
  7. #include <term.h>
  8. #endif
  9. #undef    killchar
  10.  
  11. #ifdef PDCDEBUG
  12. char *rcsid_killchar = "$Header: C:\CURSES\portable\RCS\killchar.c 2.1 1993/06/18 20:19:22 MH Rel MH $";
  13. #endif
  14.  
  15.  
  16.  
  17.  
  18. /*man-start*********************************************************************
  19.  
  20.   killchar()    - return current KILL character
  21.  
  22.   X/Open Description:
  23.      The user's current line KILL character.
  24.  
  25.   PDCurses Description:
  26.      This is hardcoded at this time.  There may be future development
  27.      to allow applications an easy way to specify this value.
  28.  
  29.   X/Open Return Value:
  30.      The killchar() function returns the user's current line KILL
  31.      character.
  32.  
  33.   X/Open Errors:
  34.      No errors are defined for this function.
  35.  
  36.   Portability:
  37.      PDCurses    char killchar( void );
  38.      X/Open Dec '88    char killchar( void );
  39.      BSD Curses    char killchar( void );
  40.      SYS V Curses    char killchar( void );
  41.  
  42. **man-end**********************************************************************/
  43.  
  44. char    killchar(void)
  45. {
  46. #ifdef PDCDEBUG
  47.     if (trace_on) PDC_debug("killchar() - called\n");
  48. #endif
  49.  
  50. #ifdef UNIX
  51. #ifdef USE_TERMIO
  52.     ioctl(_CUR_TERM.fd, TCGETA, &_CUR_TERM.prog_mode);
  53.     return(_CUR_TERM.prog_mode.c_cc[VKILL]);
  54. #else
  55.     ioctl(_CUR_TERM.fd, TIOCGETP, &_CUR_TERM.prog_mode.v6);
  56.     return(_CUR_TERM.prog_mode.v6.sg_kill);
  57. #endif
  58. #else
  59.     return( _DLCHAR );    /* line delete char (^U) */
  60. #endif
  61. }
  62.